package com.mocha.bss.domain.org.contoller.pc;

import com.coffee.core.CoffeeResponse;
import com.mocha.bss.domain.org.service.AdmdivService;
import com.mocha.bss.org.bo.UserAdmdivBO;
import com.mocha.bss.org.vo.AdmdivTreeVO;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @author songkui
 * @since 2025/4/25
 */
@RestController
@RequestMapping("/pc/adm")
@AllArgsConstructor
public class AdmdivController {

    private final AdmdivService admdivService;

    /** 查询行政区划-userId非必穿 */
    @GetMapping("/tree")
    public CoffeeResponse<AdmdivTreeVO> treeAdmdiv(@RequestParam(value ="userId", required = false) Long userId) {
        return CoffeeResponse.responseSuccess(admdivService.admdivTreeByUserId(userId));
    }

    /** 添加用户-行政区划 */
    @PostMapping("/add-user")
    public CoffeeResponse<?> addUserAdmdiv(@RequestBody UserAdmdivBO userAdmdivBO){
        //TODO 添加用户-行政区划
        return CoffeeResponse.success();
    }



}
